<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Tag extends Model
{
    use SoftDeletes;
    protected $table = 'tags';
    protected $fillable=['name','sort'];

    public function manyPost()
    {
        return $this->belongsToMany(Post::class,'posts_tags','tag_id','post_id');
    }
}
